<%layout("/common/layout.html"){%>

<%include("/common/head.html"){}%>

<div class="am-lg">

    <div class="am-text-center">
        <h1>添加新书</h1>
    </div>

    <div class="am-u-sm-12">

        <%include("/common/user_left.html"){}%>

        <div class="am-u-sm-7">
            <br>

            <div class="am-panel am-panel-default" style="padding: 20px">

                <form method="post" action="${base}/book/addBook" class="am-form am-form-horizontal">
                    <div class="am-form-group am-form-group-sm">
                        <label for="doc-ipt-3-1" class="am-u-sm-2 am-form-label">ISBN码</label>

                        <div class="am-u-sm-10">
                            <input type="text" name="ISBN" id="doc-ipt-3-1" class="am-form-field"
                                   placeholder="输入你的ISBN码">
                        </div>
                    </div>

                    <div class="am-form-group am-form-group-sm">
                        <label for="contact" class="am-u-sm-2 am-form-label">联系方式</label>

                        <div class="am-u-sm-10">
                            <input type="text" name="contact" id="contact" class="am-form-field"
                                   placeholder="输入你的联系方式">
                        </div>
                    </div>

                    <br>

                    <div class="am-g am-text-center">
                        <label>
                            <input id='sell' type="radio" name="type" value="0">出售
                        </label>
                        <label>
                            <input id='buy' type="radio" name="type" value="1">求购
                        </label>
                        <label>
                            <input id='send' type="radio" name="type" value="2">赠送
                        </label>
                    </div>


                    <h3>标签</h3>

                    <div class="am-g am-text-center">
                        <ul>
                            <%for(sort in session.sorts){%>
                            <li>
                                <%for(cate in session.category){%>
                                <%if(cate.sortId==sort.id){%>
                                <label><input type="radio" name="category" value="${cate.id}">${cate.name}</label>
                                <%}}%>
                            </li>
                            <%}%>
                        </ul>
                    </div>

                    <p><input id="price" type="text" name="price" style="display: none" class="am-form-field am-round"
                              placeholder="书的价格"/></p>

                    <p><textarea id="method" name="method" style="display: none" class="am-form-field am-round"
                                 placeholder="附加条件..."></textarea></p>

                    <br>
                    <br>

                    <div class="am-lg-text-center">
                        <input type="submit" value="发布" class="am-btn am-btn-primary">
                    </div>
                </form>


            </div>

        </div>
    </div>
</div>


<%}%>